function WaterPollutionController(){
    var service=new Object();
    service.url=host+"/environment-protection"+"/water/pollution";
    /**
      *查询指定监测点,当天的监测记录,用于实时监测页面趋势图 
      *@param monitorPointId  监测点Id 
      */
     service.getPollutionRtdRecordsToday=function(monitorPointId,onSuccess){
	     var monitorPointIdStr=monitorPointId;
		 var requestUrl=this.url+"/today/rtd/record";
         $.ajax({
             url:requestUrl,
             type:'Get',
             data:{
                   monitorPointId:monitorPointIdStr,
             },
             cache:false,
             success:onSuccess,
             error:common.onError
             });
    };
           
    /**
      *查询指定监测点的监测记录(实时数据) 
      *@param monitorPointId  监测点Id 
      *@param pageNo  页号,从1开始 
      *@param pageSize  页大小 
      *@param startTime  开始时间 
      *@param endTime  结束时间 
      *@param alarmFlag  指标状态,-1表示查询所有,0正常,1超标,2异常 
      */
     service.getPollutionRtdRecords=function(monitorPointId,pageNo,pageSize,startTime,endTime,alarmFlag,onSuccess){
	     var monitorPointIdStr=monitorPointId;
	     var pageNoStr=pageNo;
	     var pageSizeStr=pageSize;
	     var startTimeStr=startTime;
	     var endTimeStr=endTime;
	     var alarmFlagStr=alarmFlag;
		 var requestUrl=this.url+"/rtd/record";
         $.ajax({
             url:requestUrl,
             type:'Get',
             data:{
                   monitorPointId:monitorPointIdStr,
                   pageNo:pageNoStr,
                   pageSize:pageSizeStr,
                   startTime:startTimeStr,
                   endTime:endTimeStr,
                   alarmFlag:alarmFlagStr,
             },
             cache:false,
             success:onSuccess,
             error:common.onError
             });
    };
           
    /**
      *导出指定监测点的监测记录(实时数据) 
      *@param monitorPointId  监测点Id 
      *@param pageNo  页号,从1开始 
      *@param pageSize  页大小 
      *@param startTime  开始时间 
      *@param endTime  结束时间 
      *@param alarmFlag  指标状态,-1表示查询所有,0正常,1超标,2异常 
      */
     service.exportPollutionRtdRecords=function(monitorPointId,pageNo,pageSize,startTime,endTime,alarmFlag,onSuccess){
	     var monitorPointIdStr=monitorPointId;
	     var pageNoStr=pageNo;
	     var pageSizeStr=pageSize;
	     var startTimeStr=startTime;
	     var endTimeStr=endTime;
	     var alarmFlagStr=alarmFlag;
		 var requestUrl=this.url+"/rtd/record/export";
         $.ajax({
             url:requestUrl,
             type:'Request',
             data:{
                   monitorPointId:monitorPointIdStr,
                   pageNo:pageNoStr,
                   pageSize:pageSizeStr,
                   startTime:startTimeStr,
                   endTime:endTimeStr,
                   alarmFlag:alarmFlagStr,
             },
             cache:false,
             success:onSuccess,
             error:common.onError
             });
    };
           
    /**
      *查询指定监测点的监测记录(分钟/小时数据) 
      *@param monitorPointId  监测点Id 
      *@param pageNo  页号,从1开始 
      *@param pageSize  页大小 
      *@param startTime  开始时间 
      *@param endTime  结束时间 
      *@param alarmFlag  指标状态,-1表示查询所有,0正常,1超标,2异常 
      *@param dataType  数据类型,1表示分钟数据,2表示小时数据 
      */
     service.getPollutionIntervalRecords=function(monitorPointId,pageNo,pageSize,startTime,endTime,alarmFlag,dataType,onSuccess){
	     var monitorPointIdStr=monitorPointId;
	     var pageNoStr=pageNo;
	     var pageSizeStr=pageSize;
	     var startTimeStr=startTime;
	     var endTimeStr=endTime;
	     var alarmFlagStr=alarmFlag;
	     var dataTypeStr=dataType;
		 var requestUrl=this.url+"/interval/record";
         $.ajax({
             url:requestUrl,
             type:'Get',
             data:{
                   monitorPointId:monitorPointIdStr,
                   pageNo:pageNoStr,
                   pageSize:pageSizeStr,
                   startTime:startTimeStr,
                   endTime:endTimeStr,
                   alarmFlag:alarmFlagStr,
                   dataType:dataTypeStr,
             },
             cache:false,
             success:onSuccess,
             error:common.onError
             });
    };
           
    /**
      *导出指定监测点的监测记录(分钟/小时数据) 
      *@param monitorPointId  监测点Id 
      *@param pageNo  页号,从1开始 
      *@param pageSize  页大小 
      *@param startTime  开始时间 
      *@param endTime  结束时间 
      *@param alarmFlag  指标状态,-1表示查询所有,0正常,1超标,2异常 
      *@param dataType  数据类型,1表示分钟数据,2表示小时数据 
      */
     service.exportPollutionIntervalRecords=function(monitorPointId,pageNo,pageSize,startTime,endTime,alarmFlag,dataType,onSuccess){
	     var monitorPointIdStr=monitorPointId;
	     var pageNoStr=pageNo;
	     var pageSizeStr=pageSize;
	     var startTimeStr=startTime;
	     var endTimeStr=endTime;
	     var alarmFlagStr=alarmFlag;
	     var dataTypeStr=dataType;
		 var requestUrl=this.url+"/interval/record/export";
         $.ajax({
             url:requestUrl,
             type:'Request',
             data:{
                   monitorPointId:monitorPointIdStr,
                   pageNo:pageNoStr,
                   pageSize:pageSizeStr,
                   startTime:startTimeStr,
                   endTime:endTimeStr,
                   alarmFlag:alarmFlagStr,
                   dataType:dataTypeStr,
             },
             cache:false,
             success:onSuccess,
             error:common.onError
             });
    };
           
    /**
      *查看数据项详情 
      *@param recordDataType  记录数据类型,1表示分钟数据,2表示小时数据 
      *@param recordId  记录数据Id 
      *@param dataItemName  数据项名称 
      */
     service.getDataItemDetail=function(recordDataType,recordId,dataItemName,onSuccess){
	     var recordDataTypeStr=recordDataType;
	     var recordIdStr=recordId;
	     var dataItemNameStr=dataItemName;
		 var requestUrl=this.url+"/data/item/detail";
         $.ajax({
             url:requestUrl,
             type:'Get',
             data:{
                   recordDataType:recordDataTypeStr,
                   recordId:recordIdStr,
                   dataItemName:dataItemNameStr,
             },
             cache:false,
             success:onSuccess,
             error:common.onError
             });
    };
           
    /**
      *查询指定监测点的监测记录(分钟/小时数据) 
      *@param monitorPointId  监测点Id 
      *@param startTime  开始时间 
      *@param endTime  结束时间 
      *@param dataType  数据类型,1表示分钟数据,2表示小时数据 
      */
     service.getPollutionIntervalRecordsForChart=function(monitorPointId,startTime,endTime,dataType,onSuccess){
	     var monitorPointIdStr=monitorPointId;
	     var startTimeStr=startTime;
	     var endTimeStr=endTime;
	     var dataTypeStr=dataType;
		 var requestUrl=this.url+"/interval/record/chart";
         $.ajax({
             url:requestUrl,
             type:'Get',
             data:{
                   monitorPointId:monitorPointIdStr,
                   startTime:startTimeStr,
                   endTime:endTimeStr,
                   dataType:dataTypeStr,
             },
             cache:false,
             success:onSuccess,
             error:common.onError
             });
    };
           
    return service;
}
